package ui.media 
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import model.Model;
	import utils.TextFieldUtil;
	
	/**
	 * ...
	 * @author usual
	 */
	public class DiaporamaDescription extends MovieClip 
	{
		private var _id:String;
		private var _titleText:TextField;
		public function DiaporamaDescription(id:String) 
		{
			_id = id;
			addEventListener(Event.ADDED_TO_STAGE, _build);
		}
		
		private function _build(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, _build);
			addTitle();
			addTags();
			buttonMode = true;
			cacheAsBitmap = true;
		}
		
		private function addTags():void 
		{
			
		}
		
		private function addTitle():void 
		{
			_titleText = new TextField();
			_titleText.mouseEnabled = false;
			_titleText.selectable = false;
			_titleText.multiline =_titleText.wordWrap = true;
			_titleText.width = 500;
			_titleText.autoSize = TextFieldAutoSize.LEFT;
			_titleText.cacheAsBitmap = true;
			TextFieldUtil.setText(_titleText, String('<diaporamaDescription>'+Model.instance.getUiLabel(_id + '-title')+'</diaporamaDescription>').toUpperCase());
			addChild(_titleText);
		}
		
	}

}